package com.hmy.finance.api.bo.core.request.enums;

import lombok.Getter;

/**
 * 业务单据类型枚举
 *
 * @author songkf
 */

@Getter
public enum FeeTypeEnum {
    //生成注释
    //费用类型，1-运费，2-运费减免，3-改装费，4-改装费减免，5-索赔费用，6-索赔费用减免，7-报停费用，8-报停费用减免，9-租金，10-租金减免,11-退场报停费用减免,12-补录报停费用
    SHIPPING_FEE("1", "运费"),

    SHIPPING_FEE_WAIVER("2", "运费减免"),

    MODIFICATION_FEE("3", "改装费"),

    MODIFICATION_FEE_WAIVER("4", "改装费减免"),

    CLAIMS_FEE("5", "索赔费用"),

    CLAIMS_FEE_WAIVER("6", "索赔费用减免"),

    PAUSE_FEE("7", "报停费用"),

    PAUSE_FEE_WAIVER("8", "报停费用减免"),

    RENT_FEE("9", "租金"),
    //已废弃
    RENT_FEE_WAIVER("10", "租金减免"),
    //已废弃
    EXIT_PAUSE_FEE_WAIVER("11", "退场报停费用减免"),

    SUPPLEMENTARY_PAUSE_FEE("12", "补录报停费用"),

    INITIAL_DAY_FEE("13", "入场日非全日费用"),

    INITIAL_DAY_FEE_WAIVER("14", "入场日非全日费用减免");


    private final String value;
    private final String desc;

    FeeTypeEnum(
            String value, String
            desc) {
        this.value = value;
        this.desc = desc;
    }

    /**
     * 根据value获取desc
     *
     * @param value value
     * @return desc
     * @author songkf
     */
    public static String getDescByValue(String value) {
        for (FeeTypeEnum businessBillTypeEnum :
                FeeTypeEnum.values()) {
            if (businessBillTypeEnum.getValue().equals(value)) {
                return businessBillTypeEnum.getDesc();
            }
        }
        return null;
    }

    //根据value获取FeeTypeEnum
    public static FeeTypeEnum getFeeTypeEnumByValue(String value) {
        for (FeeTypeEnum businessBillTypeEnum :
                FeeTypeEnum.values()) {
            if (businessBillTypeEnum.getValue().equals(value)) {
                return businessBillTypeEnum;
            }
        }
        return null;
    }

}
